import { _decorator, Component, Label, Node, Slider, Sprite, Toggle, Vec2, Vec3 } from 'cc';
import { UIManager } from '../UIManager';
import { LanauageManager } from '../LanauageManager';
import { GameData } from '../GameData';
import { HttpClient } from '../net/HttpClient';
import { EventManager } from '../EventManager';
import { AudioMgr } from '../AudioMgr';
const { ccclass, property } = _decorator;

@ccclass('popupSeting')
export class popupSeting extends Component {

    @property(Slider)  
    soundSlider: Slider = null; 

    @property(Slider)  
    musicSlider: Slider = null; 

       
    onEnable() {
        this.refresh();
    }

    refresh(){
        // this.soundSlider.progress = GameData.getInstance().userData.sound;

        // this.musicSlider.progress = GameData.getInstance().userData.music;
    }

    onChangeMusic(event:Event, str:string){
        // GameData.getInstance().userData.sound = this.soundSlider.progress;

        // AudioMgr.inst.setBGMVolume(this.soundSlider.progress);
    }

    onChangeSound(event:Event, str:string){
        //GameData.getInstance().userData.music = this.musicSlider.progress;
    }
}

